pkg = @PACKAGE@.dll

EXTRA_DIST = $(pkg_sources) $(pkg_sources_in) key.snk
CLEANFILES = @PACKAGE@.dll
DISTCLEANFILES = AssemblyInfo.cs Makefile.in

ASSEMBLY = $(pkg)
ASSEMBLY_NAME = $(subst .dll,,$(ASSEMBLY))

noinst_SCRIPTS = $(pkg)

gslgluelibdir=$(libdir)
libgsl_glue_la_SOURCES = gsl_alloc_interp_cspline.c
gslgluelib_LTLIBRARIES = libgsl_glue.la
INCLUDES = $(GSL_CFLAGS)
libgsl_glue_la_LIBADD = $(GSL_LIBS)

pkg_sources_in = AssemblyInfo.cs.in
pkg_generated_sources = $(pkg_sources_in:.in=)
pkg_sources = Block.cs Complex.cs Matrix.cs Vector.cs SpecialFunctions.cs Error.cs Eigensystem.cs FitInfo.cs Function.cs Integration.cs LeastSquaresFit.cs Interpolation.cs

pkg_build_sources = $(addprefix $(srcdir)/, $(pkg_sources))
pkg_build_sources += $(pkg_generated_sources)

$(pkg): $(pkg_build_sources)
	$(MCS) -target:library -out:$@ $(pkg_build_sources)

install-data-local:
	gacutil -i $(ASSEMBLY) -f -package $(PACKAGE) -root $(DESTDIR)$(libdir)

uninstall-local:
	gacutil -u $(ASSEMBLY_NAME) -package $(PACKAGE) -root $(DESTDIR)$(libdir)
	
